Improve build-system setup
authorStuart Prescott <stuart@debian.org>
Tue, 7 May 2024 11:26:19 +0000 (21:26 +1000)
committerStuart Prescott <stuart@debian.org>
Tue, 7 May 2024 11:26:19 +0000 (21:26 +1000)
debian/rules

index 2da808186af3fc5625978f34de60bb58d2d2feb8..4ed93810d12bd099cf7e0518798ff1fddf3a1653 100755 (executable)
@@ -26,8 +26,8 @@ export LLVM_INSTALL_DIR := $(shell llvm-config --prefix)
 undefine XDG_RUNTIME_DIR
 
 
-PYBUILD_BUILD_ARGS = --skip-packaging
-PYBUILD_INSTALL_ARGS = --reuse-build --skip-packaging
+PYBUILD_BUILD_ARGS =
+PYBUILD_INSTALL_ARGS = --reuse-build
 
 ## Package compilation options
 
@@ -38,7 +38,7 @@ SCCACHE := $(shell command -v sccache 2> /dev/null)
 ifdef SCCACHE
   SCCACHE_DIR ?= $(HOME)/.cache/sccache
   export SCCACHE_DIR
-  PYBUILD_BUILD_ARGS = --compiler-launcher=sccache
+  PYBUILD_BUILD_ARGS += --compiler-launcher=sccache
 execute_before_dh_auto_build:
        -sccache --start-server
 endif
@@ -84,7 +84,12 @@ override_dh_installdocs-indep:
        dh_installdocs -X.doctrees
        find debian -name __pycache__ -type d -exec rm -rf {} +
 
+override_dh_installexamples-indep:
+       find debian -name __pycache__ -type d -exec rm -rf {} +
+
 execute_after_dh_install-arch:
+       # remove extra copies of documentation
+       rm -rf debian/libshiboken6-py3-*/usr/lib/python*/dist-packages/shiboken6/docs/
        # remove RUNPATH from libraries and executables
        # only look at files not symlinks
        find debian/*/usr/lib/ -name \*.so* -type f -exec chrpath -d {} \;
@@ -93,7 +98,13 @@ execute_after_dh_install-arch:
        chrpath -d \
          debian/*/usr/lib/python*/dist-packages/PySide6/assistant \
          debian/*/usr/lib/python*/dist-packages/PySide6/designer \
-         debian/*/usr/lib/python*/dist-packages/PySide6/linguist
+         debian/*/usr/lib/python*/dist-packages/PySide6/linguist \
+         debian/*/usr/lib/python*/dist-packages/PySide6/lrelease \
+         debian/*/usr/lib/python*/dist-packages/PySide6/lupdate \
+         debian/*/usr/lib/python*/dist-packages/PySide6/qmlformat \
+         debian/*/usr/lib/python*/dist-packages/PySide6/qmllint \
+         debian/*/usr/lib/python*/dist-packages/PySide6/qmlls \
+         debian/*/usr/lib/python*/dist-packages/shiboken6_generator/shiboken6
 
        # remove executable permissions
        find debian/pyside6-tools/usr/lib/python3*/dist-packages/PySide6/scripts/ -type f -exec chmod a-x {} +